<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no" name="format-detection">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1;user-scalable=no;">
    <title>1起购</title>
    <link rel="stylesheet" href="/statics/view/css/bootstrap.css">
    <link rel="stylesheet" href="/statics/view/css/style.css">
    <link rel="stylesheet" href="/statics/view/css/member.css">
    <link rel="stylesheet" href="/statics/view/css/order3.css">
    <link href="/statics/view/css/yy_common.css" rel="stylesheet">
    <script charset="utf-8" src="/statics/view/js/jquery.min.js"></script>
    <script charset="utf-8" src="/statics/view/js/global.js"></script>
    <script charset="utf-8" src="/statics/view/js/bootstrap.min.js"></script>
    <script charset="utf-8" src="/statics/view/js/template.js"></script>
    <script charset="utf-8" src="/statics/view/js/stickTop.js"></script>
    <script type="text/javascript" src="/statics/layer.m/layer.m.js"></script>
    <style type="text/css">
        .details_con li .tb-out-of-stock{
            border: 1px dashed #bbb;
            color:#bbb;
            cursor: not-allowed;
        }
        .no-selected{
            background: #ffe8e8 none repeat scroll 0 0;
            border: 2px solid #be0106;
            margin: -1px;
        }
        /*动态返回顶部*/
        .fixed_box { position: fixed; bottom: .5rem; right: .5rem;display: none; }
    </style>
</head>

<body>

<div class="fanhui_cou">
    <div class="fanhui_1"></div>
    <div class="fanhui_ding">顶部</div>
</div>

<header class="header">
    <div class="fix_nav">
        <div style="max-width:768px;margin:0 auto;background:#db3652;position: relative;">
            <a class="nav-left back-icon" href="javascript:history.back();">返回</a>
            <div class="tit">抢购记录</div>
            <a class="nav-right icon-home" href="/dbs/index.html">首页</a>
        </div>
    </div>
</header>
<div class="container" id="dataList" data-pro="list">
[#list orderList as order]
    <a href="/dbs/product-${order.productId}-${order.timesNo}.html">
        <div class="hproduct clearfix" style="background:#fff;border-top:0px;">
            <div class="p-pic"><img style="max-height:100px;margin:auto;" class="img-responsive"  alt="${order.name}" src="${order.productMedium}"></div>
            <div class="p-info">
                <p class="item-name">${order.name}</p>
                <p class="mb0 old-price">总需：${order.dbTimes.quantity}人次 </p>
                <p class="mb0 old-price">期号：${order.timesNo} </p>
    [#if order.dbTimes.isLottery]
        <p class="mb0 old-price">幸运者：<a href="">${order.dbTimes.lotteryMobileInfo}</a></p>
        <p class="mb0 old-price">幸运号码：<span class="red">${order.dbTimes.timesCode}</span></p>

    <p class="mb0 old-price">揭晓时间:[#if order.dbTimes.endDate??]${order.dbTimes.endDate?string("yyyy-MM-dd HH:mm:ss")}
    [/#if]

        [#if order.dbTimes.lotteryMobile==member.mobile&&order.isLottery]
                <span class=" pull-right">

                    [#if order.dbTimes.flag==1]虚拟物品,请耐心等待[#else]<a class="mb0 old-price" style="color:#0044cc" href="/member/dbRecord/winDetail-${order.id}">中奖信息</a>[/#if]
				      </span>

            [/#if]
</p>

    [#else]
        <p class="mb0 old-price red">尚未揭晓</p>
    [/#if]
                <p class="mb0 old-price">   本次参与:   <span class="red"> ${order.quantity}</span>人次
    [#if order.distributionQuantity != 0]
                    <a class="mb0 old-price" id="showMyCode"  href="javascript:void(0)" style="color:#0044cc" data-id="${order.id}" data-name="${order.name}" data-content="${order.codeInfo}" href="javascript:void(0);" data-pro="mycode">
                        查看我的号码
                        <div  style="display: none;">
                        ${order.htmlCodeInfo}
                        </div>
                    </a>
    [/#if]
                </p>

                    <p>  <span class="mb0 old-price red">
                        [#if order.distributionQuantity!=null&&order.distributionQuantity!=order.quantity]
                            实际分配${order.distributionQuantity},未分配份数已经退款到宝币余额
                        [/#if]
                    </span></p>
            </div>
        </div>
    </a>
[/#list]
</div>
<div data-pro="more">
    <div class="w-more" id="pro-view-14">
        <div data-pro="link"><a href="javascript:void(0);" data-current-page="1" data-page-num="10" id="load-more">点击加载更多</a></div>
    </div>
</div>


<div class="clear"></div>
<div class="fixed_box" style="-webkit-transform-origin: 0px 0px; opacity: 1; -webkit-transform: scale(1, 1); display: none;">
    <a href="javascript:scrollTo(0,0)" class="btn_back" id="backtop"><img style="width:2rem" src="images/2/go-top.png"></a>
</div>

<script type="text/javascript">


    $(function(){
        $("#showMyCode").click(function(){
            var data=$(this).attr("data-content");
            var name = $(this).attr("data-name");
            alert(data);
            // 加载全部夺宝号
            $(".w-msgbox-codes .f-txtabb").html(name);
            $(".w-msgbox-codes .txt-red").html(data.split(",").length);
        });

        $("#load-more").click(function(){
            var $this=$(this);
            var currentNum=$this.attr("data-current-page");
            var pageNum=parseInt(currentNum);
            layer.open({
                type: 2,
                content: '加载中~'
            });
            $.ajax({
                url: "/dMember/record-content",
                type: "GET",
                data: {
                    pageNum: pageNum+1
                },
                dataType: "text",
                cache: false,
                success: function(data) {
                    layer.closeAll();
                    if(data.trim().length>10){
                        $(data).appendTo("#dataList");
                        currentNum=currentNum+1;
                        $this.attr("data-current-page",pageNum+1);
                    }else{
                        layer.open({
                            content: "没有更多了",
                            time: 2
                        });
                    }
                },error:function(){
                    layer.closeAll();
                    layer.open({
                        content: "加载异常",
                        time: 2
                    });
                }
            });
        });
    });
</script>

<!-- 模态框（Modal） -->

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">

                </h4>
            </div>
            <div class="modal-body w-msgbox-codes">
                <div class="name">
                    <h3 class="f-txtabb"></h3>
                    <span><b class="txt-red"></b>人次</span>
                </div>
                <p>以下是你的所有夺宝号码：</p>
                <ul></ul>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</body>
</html>